{include file="public/toper"/}
<style>
    .layui-unselect{width: 190px;}
</style>
<div class="x-body">
    <form action="" method="post" class="layui-form" id="forms">
        <input type="hidden" value="{$list.store_user_id}" name="store_user_id" class="layui-input">
        <input type="hidden" value="{$list.sn}" name="sn" class="layui-input">
        <div class="layui-form-item">
            <label for="name" class="layui-form-label">
                <span class="x-red"></span>编号
            </label>

            <label for="name" class="layui-form-label">
                <span class="x-red"></span>{$list.sn}
            </label>
        </div>
        <div class="layui-form-item">
            <label for="name" class="layui-form-label">
                <span class="x-red">*</span>名称
            </label>
            <div class="layui-input-inline">
                <input type="text" value="{$list.name}" id="name" name="name" required="" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>20个字符以内
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>门店
            </label>
            <div class="layui-input-inline">
                <select style="width:8%;margin-left:15px" name="store_id">
                    {volist name="store" id="vo"}
                    <option value="{$vo.store_id}" {if condition = "$list.store_id eq $vo.store_id"}selected="selected"{/if} disabled="disabled" >{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="phone" class="layui-form-label">
                <span class="x-red">*</span>手机号
            </label>
            <div class="layui-input-inline">
                <input type="number" value="{$list.phone}" id="phone" name="phone" required="" lay-verify="phone" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>性别
            </label>
            <div class="layui-input-block">
                <input type="radio" name="sex" value="0" {if condition = "$list.sex eq 0"}checked="checked"{/if}  title="男">
                <input type="radio" name="sex" value="1" {if condition = "$list.sex eq 1"}checked="checked"{/if} title="女">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red"></span>发展人
            </label>
            <div class="layui-input-inline">
                <input type="text" value="{$list.developing_person}" name="developing_person" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>30个字符
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>二维码
            </label>
            <div class="layui-input-inline">
                <img src="{$list.qrcode}" style="width:100px;height: 100px;"> <p>{$list.name}</p>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*<a onclick=downloadImage('{$list.qrcode}') >点击下载</a></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button  class="layui-btn" lay-filter="formSubmit" lay-submit="">提交</button>
        </div>
    </form>
</div>
<script>
    function downloadImage(src) {
        var $a = $("<a></a>").attr("href", src).attr("download", "qrcode.png");
        $a[0].click();
    }
</script>
{include file="public/footer"/}